<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .active {
        border: 3px solid greenyellow;
    }
</style>

<body>
    <div id="app">
        <img :src="imgSrc" :class="{active:isActive}" @click="toggleActive" alt="" :title="imgTitle+'！！！'">

    </div>
</body>
<script src="../vue.js"></script>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            imgSrc: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3825137091,3899968286&fm=11&gp=0.jpg",
            imgTitle: "生不出人，我很抱歉",
            isActive: false

        },
        methods: {
            toggleActive: function () {
                this.isActive = !this.isActive;
            }
        }
    })


</script>

</html>